Compiling and distributing generic libraries with heterogeneous data and code representation

نویسنده

  • Roland J. Weiss
چکیده

Generic programming has evolved at fast pace in recent years. There now exist numerous programming languages that support genericity, and generic libraries were developed that range from small utility libraries to huge general purpose or domain specific libraries. The importance of specification and verification was further emphasized in the context of generic algorithms and data structures, which became major issues in the research community. The largest generic code base is available in C++ which plays a central role for generic programming, because the Standard Template Library (STL) was implemented in C++. The STL ignited the application of its underlying principles to other domains, resulting in influential C++ libraries like the Matrix Template Library (MTL) or the Boost Graph Library (BGL). This thesis deals with a problem that became apparent for languages like C++, Ada, or Modula-3 that support genericity with heterogeneous data and code representation, especially with regard to large generic libraries. These libraries cannot be compiled and distributed without their source code. Application programs using generic libraries will have to compile the occurring instantiations of generic constructs from the libraries’ source code repeatedly during their development cycle. We first present a general approach to overcome the conceptual problem that necessitates this practice. It mandates a strict separation of compiler front-end and back-end which are connected by a special intermediate representation. Then an overview of the GILF system is given, our incarnation of the solution. Although the GILF system was developed for SUCHTHAT, a generic programming language devised by Sibylle Schupp, GILF is designed to support a wide range of generic programming languages with varying semantics for instantiation, specialization and overloading. We achieve this by separating declarations from definitions, as well as splitting the instantiation process into analysis and application. The information gathered by instantiation analysis is propagated from a compiler’s front-end to its back-end as explicit bindings of instantiation parameters to arguments in the mentioned intermediate language. GILF even allows binding multiple algorithms to one function symbol, which provides the basic mechanisms required for online or off-line algorithm selection. Algorithm selection can be exploited with instantiation at load-time or run-time. Thereafter, we introduce XGILF, the XML-based external GILF representation. An extensive specification is elaborated, covering all core features of GILF. Finally, the GILF prototype implementation is discussed in detail, showing the feasibility of our approach.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Generic Generic Programming

Generic programming (GP) is a form of abstraction in programming languages that serves to reduce code duplication by exploiting the regular structure of algebraic datatypes. Over the years, several different approaches to GP in Haskell have surfaced. These approaches are often similar, but certain differences make them particularly well-suited for one specific domain or application. As such, th...

متن کامل

Polytypic Functional Programming

Structural polymorphism is a generic programming technique known within the functional programming community under the names of polytypic or datatype-generic programming. In this thesis we show that such a technique conflicts with the principle of data abstraction and propose a solution for reconciliation. More concretely, we show that popular polytypic extensions of the functional programming ...

متن کامل

Accelerating high-order WENO schemes using two heterogeneous GPUs

A double-GPU code is developed to accelerate WENO schemes. The test problem is a compressible viscous flow. The convective terms are discretized using third- to ninth-order WENO schemes and the viscous terms are discretized by the standard fourth-order central scheme. The code written in CUDA programming language is developed by modifying a single-GPU code. The OpenMP library is used for parall...

متن کامل

An Experiment in Mixed Compilation /

One of the classic forms of intermediate representation used for communication between compiler front-ends and back-ends are those based on abstract stack machines. It is possible to compile the stack machine instructions into machine code by means of an interpretive code generator, or to simulate the stack machine at runtime using an interpreter. This paper describes an approach intermediate b...

متن کامل

Proposed content framework for digital literacy education to users in Iran

Aim: today, digital literacy, as a set of skills that enable people to use digital space effectively for success in personal, educational and professional life, has become a necessity in all societies and public libraries are one of the most important providers of digital literacy education in the world. Digital literacy education has not been considered in public libraries in Iran. The first s...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003